#include "v3d_interface.h"
#include "v3d_defs.h"
#include <string.h>


V3dInterface::V3dInterface(void)
{
	LOG("hello v3d_interface ......\n");

	kbKeys = new boolean[KB_MAX_KEYS];
	ResetKeys();
}

V3dInterface::~V3dInterface(void)
{

	if(kbKeys != NULL)
	{
		delete kbKeys;
		kbKeys = NULL;
	}
}

void V3dInterface::ResetKeys()
{
	memset(kbKeys,0,sizeof(boolean)*KB_MAX_KEYS);	//setting to default//false
}

void V3dInterface::ResetKey(uint8 key)
{
	kbKeys[key] = false;
}
void V3dInterface::SetKey(uint8 key)
{
	kbKeys[key] = true;
}
boolean V3dInterface::IsKey(uint8 key)
{
	return kbKeys[key];
}


void V3dInterface::Update()
{

}

void V3dInterface::DeInit()
{
	if(I != NULL)
	{
		LOG("Destroying v3d_interface...\n");
		delete I;
		V3dInterface::I = NULL;

	}

}
